package com.company;

/**
 * Created by elimydlarz on 14/04/14.
 */
public class LineWriter {

    private final String LINE_BREAK = System.getProperty("line.separator");

    public void writeAsterisk() {
        System.out.println("*");
    }

    public void writeHorizontalLine(Integer length) {
        StringBuilder line = new StringBuilder();
        for (int i = 0; i < length; i++) {
            line.append('*');
        }
        System.out.println(line);
    }

    public void writeVerticalLine(Integer length) {
        StringBuilder line = new StringBuilder();
        for (int i = 0; i < length; i++) {
            line.append('*');
            line.append(LINE_BREAK);
        }
        System.out.print(line);
    }
}
